import {defineStore} from 'pinia'

//创建store实例方法
const useHomeStore = defineStore('homeStore',{
    state:()=>{
        return {
            cate:[], //三级分类
            banner:[], //轮播图
            floor:[] //楼层图
        }
    },

    //更新数据方法
    actions:{
        //更新三级分类
        updateCate(categoryList:any){
            this.cate = categoryList
        },

        //更新轮播图
        updateBanner(bannerList:any){
            this.banner = bannerList
        },

        //更新楼层数据
        updateFloor(FloorList:any){
            this.floor = FloorList
        }
    },

    getters:{}
})

//暴露
export default useHomeStore